﻿@{
    Layout = null;
    ViewBag.Title = "奔跑吧股民";
}
@using EmoneyWeiXinEntity;
@using EmoneyWeiXinCommon;
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>奔跑吧股民</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <link type="text/css" href="@Url.Content("~/css/basic.css")" rel="stylesheet"/>
    <script src="@Url.Content("~/js/jquery.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/jweixin-1.0.0.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/js/WeiXinCommon.js")?@(new Random().Next(1, 1000))"></script>
</head>
<body class="body" onresize="rize()" onload="rize()">
    <div class="active">
        <div class="active_bg">
            <img src="@Url.Content("~/images/bg.png")">
        </div>
        <div class="active_box">
            <p class="active_box_img">
                <img src="@Url.Content("~/images/people.png")">
            </p>
            <p class="active_box_img02">
                <img src="@Url.Content("~/images/activity_font.png")" alt="奔跑吧股民">
            </p>


            <p class="active_box_font01">
                <a href="#" id="btnGo">
                    <img src="@Url.Content("~/images/button.png")" alt="开始奔跑吧"></a>
            </p>


            <p class="active_box_font02"><a href="#" class="abtn">别着急，规则仔细看</a></p>
        </div>
        <div class="rule">
            <img src="@Url.Content("~/images/rule.png")"><span class="close"></span>
        </div>
    </div>
</body>
</html>
<script type="text/javascript">
    function rize() {
        var height = document.documentElement.clientHeight;
        $("body").css({ "height": height });
        //var active_height = $(".active_bg").height();
        // alert(active_height)
        $(".active_bg").css({ "height": height, "margin-top": -(height / 2) });
        $(".active_box").css({ "height": height, "margin-top": -(height / 2) });
    }

    $(".active_box_font02 a").click(function () {
        $(".rule").show();
    });
    $(".close").click(function () {
        $(this).parents(".rule").hide();
    });

    $(".active_box_font02 .abtn").click(function () {
        $(".rule").show();
    });
    $(".close").click(function () {
        $(this).parents(".rule").hide();
    });

    $("#btnGo").click(function () {
        window.location.href = '@Url.Action("GamePage")' + '?&openId=' + '@ViewBag.openId';
    });
</script>

@{
    weixinUserEntity wxInfo = ViewBag.wxInfo as weixinUserEntity; 
}

@*关于微信分享部分的代码*@
<script type="text/javascript">
    var AppId = "@wxInfo.AppId";
    var AppSercret = "@wxInfo.AppSecret";
    var goUrl = "@Config.Host_Url3" + "BieCaiBaiKuai/Index";
    var shareUrl = "@Config.ShareJQUrl";
    var weixinId = "@wxInfo.id";
    var timestamp = "@ViewBag.timestamp";
    var imgUrl = "@Config.Host_Url3" + "images/share2.png";
    var tTitle = "@System.Configuration.ConfigurationManager.AppSettings["shareTitle2"]";
    var tContent = "@System.Configuration.ConfigurationManager.AppSettings["shareContent2"]";
    var nonceStr = "@ViewBag.nonceStr";
    var signature = "@ViewBag.signature";

    $(function () {
        initSharePara();
    });
    ///初始化分享到朋友圈的功能
    function initSharePara() {
       
        goUrl = goUrl + "?weixinId=" + weixinId + "&fromOpenId=" + '@ViewBag.openId';
        goUrl = encodeURIComponent(goUrl);
        shareUrl = shareUrl + "?goUrl=" + goUrl + "&weixinId=" + weixinId
        mysharetime(shareUrl, imgUrl, tTitle, tContent, AppId, timestamp, nonceStr, signature, function () {

        });
    }


</script>

